<div>
    <form class="form-horizontal bv-form"  role="form"  id="updateForm">
        <input type="hidden" name="user_id" value="{$res.user_id}">
        <fieldset>
            <legend>基本信息</legend>
            <div class="form-group">
                <label class="col-sm-3 control-label">用户名</label>
                <div class="col-sm-5">
                    <input type="text"  class="form-control" id="user_name" name="user_name" value="{$res.user_username}">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">密码</label>
                <div class="col-sm-5">
                    <input type="password"  class="form-control" id="user_password" name="user_password" value="{$res.password}">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">手机号</label>
                <div class="col-sm-5">
                    <input type="text"  class="form-control" id="phone_num" name="phone_num" value="{$res.user_phone}">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">性别</label>
                <div class="col-sm-5">
                    <label> <input type="radio"  name="sex" value="1" {eq name="$res.user_gender" value="1"}checked{else/}{/eq} >&nbsp;男</label>&nbsp;&nbsp;
                    <label><input type="radio" name="sex" value="2" {eq name="$res.user_gender" value="2"}checked{else/}{/eq}>&nbsp;女</label>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">用户头像</label>
                <div class="col-sm-5">
                    <a href="javascript:;" class="file file1">选择文件
                        <input type="file" name="file" id="file1" onchange="aaaa(this);">
                    </a>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">预览图</label>
                <div class="col-sm-3 file1_1" id="androimg" style="float:left">
                    <img src="{$res.user_image}" height="150" width="150"/>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">简介</label>
                <div class="col-sm-5">
                    <textarea class="form-control" rows="5" name="user_introduction">{$res.user_signature}</textarea>
                </div>
            </div>
        </fieldset>
    </form>

</div>

<script type="text/javascript" charset="utf-8" src="static/ueditor/lang/zh-cn/zh-cn.js"></script>
<script type="text/javascript">

    function aaaa(file) {
        var prevDiv = document.getElementById('androimg');
        if (file.files && file.files[0])
        {
            var reader = new FileReader();
            reader.onload = function(evt){
                prevDiv.innerHTML = '<img src="' + evt.target.result + '" height="150" width="150"/>';
            }
            reader.readAsDataURL(file.files[0]);
        }
        else
        {
            prevDiv.innerHTML = '<div class="img" style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale,src=\'' + file.value + '\'"></div>';
        }
    }
</script>




